package com.muyu.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.system.mapper.DanmoShoppingOrderCartDetailsMapper;
import com.muyu.system.domain.DanmoShoppingOrderCartDetails;
import com.muyu.system.service.IDanmoShoppingOrderCartDetailsService;

/**
 * 购物车订单Service业务层处理
 * 
 * @author kunzong
 * @date 2024-12-13
 */
@Service
public class DanmoShoppingOrderCartDetailsServiceImpl implements IDanmoShoppingOrderCartDetailsService 
{
    @Autowired
    private DanmoShoppingOrderCartDetailsMapper danmoShoppingOrderCartDetailsMapper;

    /**
     * 查询购物车订单
     * 
     * @param id 购物车订单主键
     * @return 购物车订单
     */
    @Override
    public DanmoShoppingOrderCartDetails selectDanmoShoppingOrderCartDetailsById(Long id)
    {
        return danmoShoppingOrderCartDetailsMapper.selectDanmoShoppingOrderCartDetailsById(id);
    }

    /**
     * 查询购物车订单列表
     * 
     * @param danmoShoppingOrderCartDetails 购物车订单
     * @return 购物车订单
     */
    @Override
    public List<DanmoShoppingOrderCartDetails> selectDanmoShoppingOrderCartDetailsList(DanmoShoppingOrderCartDetails danmoShoppingOrderCartDetails)
    {
        return danmoShoppingOrderCartDetailsMapper.selectDanmoShoppingOrderCartDetailsList(danmoShoppingOrderCartDetails);
    }

    /**
     * 新增购物车订单
     * 
     * @param danmoShoppingOrderCartDetails 购物车订单
     * @return 结果
     */
    @Override
    public int insertDanmoShoppingOrderCartDetails(DanmoShoppingOrderCartDetails danmoShoppingOrderCartDetails)
    {
        return danmoShoppingOrderCartDetailsMapper.insertDanmoShoppingOrderCartDetails(danmoShoppingOrderCartDetails);
    }

    /**
     * 修改购物车订单
     * 
     * @param danmoShoppingOrderCartDetails 购物车订单
     * @return 结果
     */
    @Override
    public int updateDanmoShoppingOrderCartDetails(DanmoShoppingOrderCartDetails danmoShoppingOrderCartDetails)
    {
        return danmoShoppingOrderCartDetailsMapper.updateDanmoShoppingOrderCartDetails(danmoShoppingOrderCartDetails);
    }

    /**
     * 批量删除购物车订单
     * 
     * @param ids 需要删除的购物车订单主键
     * @return 结果
     */
    @Override
    public int deleteDanmoShoppingOrderCartDetailsByIds(Long[] ids)
    {
        return danmoShoppingOrderCartDetailsMapper.deleteDanmoShoppingOrderCartDetailsByIds(ids);
    }

    /**
     * 删除购物车订单信息
     * 
     * @param id 购物车订单主键
     * @return 结果
     */
    @Override
    public int deleteDanmoShoppingOrderCartDetailsById(Long id)
    {
        return danmoShoppingOrderCartDetailsMapper.deleteDanmoShoppingOrderCartDetailsById(id);
    }
}
